<?php


namespace Xiaoguai\DesignPattern\DP022\Visitor;


use Xiaoguai\DesignPattern\DP022\Element\ElementA;
use Xiaoguai\DesignPattern\DP022\Element\ElementB;
use Xiaoguai\DesignPattern\DP022\VisitorInterface;

class Visitor implements VisitorInterface
{

    public function visitElementA(ElementA $elementA)
    {
        $elementA->operationA();
    }

    public function visitElementB(ElementB $elementB)
    {
        $elementB->operationB();
    }
}